import Vue from 'vue'
Vue.directive('TransferDom', require('vux/src/directives/transfer-dom').default)
Vue.directive('back', {
  inserted: function (el, {value}) {
    el.addEventListener('click', () => {
      if (value == 'home') {
        backToName('user')
      } else if (value) {
        backToName(value)
      } else {
        history.back()
      }
    })
  }
})

Vue.directive('focus', {
  inserted (el) {
    el.focus()
  }
})
